package net.wofly.cashier.preorder.util;

/**
 * @author lign
 * @version 1.0
 * @created 17-十月-2017 23:09:33
 */
public enum BookMealStatus {
	订单提交(100, "订单提交"),
	订单未付款主动取消(111, "订单未付款主动取消"),
	订单未付款系统取消(112, "订单未付款系统取消"),
	订单己付款(200, "订单己付款"),
	订单己付款主动取消(211, "订单己付款主动取消"),
	订单己付款系统取消(212, "订单己付款系统取消"),
	订单己付款取消确认(219, "订单己付款取消确认"),
	己就餐(300, "己就餐"),
	未就餐(320, "未就餐");

	private Integer value;
	private String name;

	private BookMealStatus(Integer value, String name) {
		this.value = value;
		this.name = name;
	}

	public static boolean isValueCorrect(Integer value) {
		for (BookMealStatus forEnum : values()) {
			if (value == forEnum.getValue()) {
				return true;
			}
		}
		return false;
	}

	public static String getName(Integer value) {
		for (BookMealStatus forEnum : values()) {
			if (value.equals(forEnum.getValue())) {
				return forEnum.name;
			}
		}
		return null;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}
}